package de.lazy.io.properties;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;

public class PropertyHelper {

	private static HashMap<String,Properties> store; 
	
	public PropertyHelper() {
		
	}

	
	public static Properties load(String file){
		if(store == null){
			store = new HashMap<>();
		}

		Properties prop = store.get(file);
		if(prop == null){
			prop = new Properties();
			try {
				prop.load(new FileInputStream(file));
				store.put(file, prop);
				
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return prop;
	}
}
